import request from '@/config/axios'

// 用户分析 VO
export interface UserAnalysisVO {
  id: number // 主键id,即分析Id
  userId: number // 用户Id
  answerNo: number // 答题次序号
  analysisContent: string // 问题内容
}

// 用户分析 API
export const UserAnalysisApi = {
  // 查询用户分析分页
  getUserAnalysisPage: async (params: any) => {
    return await request.get({ url: `/analysis/user-analysis/page`, params })
  },

  // 查询用户分析详情
  getUserAnalysis: async (id: number) => {
    return await request.get({ url: `/analysis/user-analysis/get?id=` + id })
  },

  // 新增用户分析
  createUserAnalysis: async (data: UserAnalysisVO) => {
    return await request.post({ url: `/analysis/user-analysis/create`, data })
  },

  // 修改用户分析
  updateUserAnalysis: async (data: UserAnalysisVO) => {
    return await request.put({ url: `/analysis/user-analysis/update`, data })
  },

  // 删除用户分析
  deleteUserAnalysis: async (id: number) => {
    return await request.delete({ url: `/analysis/user-analysis/delete?id=` + id })
  },

  // 导出用户分析 Excel
  exportUserAnalysis: async (params) => {
    return await request.download({ url: `/analysis/user-analysis/export-excel`, params })
  },
}